// CQPoint.cpp: implementation of the CQPoint class.
//
//////////////////////////////////////////////////////////////////////
#include "QPoint.h"
//////////////////////////////////////////////////////////////////////

EXPORT_C CQPoint::CQPoint()
{
	x = 0 ;
	y = 0 ;
}

EXPORT_C CQPoint::CQPoint(QINT xIn, QINT yIn)
{
	x = xIn ;
	y = yIn ;
}
EXPORT_C CQPoint::CQPoint(QPOINT & initPt)
{
	x = initPt.x ;
	y = initPt.y ;
}

EXPORT_C CQPoint::CQPoint(QSIZE & initSize)
{
	x = initSize.cx ;
	y = initSize.cy ;
}

EXPORT_C QVOID CQPoint::Offset(QINT xOffset, QINT yOffset) 
{
	x += xOffset; y += yOffset; 
}

EXPORT_C QVOID CQPoint::Offset(QPOINT b) 
{ 
	x += b.x; y += b.y; 
}

EXPORT_C QVOID CQPoint::Offset(QSIZE b) 
{ 
	x += b.cx; y += b.cy; 
}

EXPORT_C QBOOL CQPoint::operator==(QPOINT b) const 
{
	return (x == b.x && y == b.y); 
}

EXPORT_C QBOOL CQPoint::operator!=(QPOINT b) const 
{ 
	return (x != b.x || y != b.y); 
}

EXPORT_C QVOID CQPoint::operator+=(QSIZE b) 
{
	x += b.cx; y += b.cy; 
}

EXPORT_C QVOID CQPoint::operator-=(QSIZE b) 
{ 
	x -= b.cx; y -= b.cy; 
}

EXPORT_C QVOID CQPoint::operator+=(QPOINT b) 
{ 
	x += b.x; y += b.y; 
}

EXPORT_C QVOID CQPoint::operator-=(QPOINT b) 
{
	x -= b.x; y -= b.y; 
}

EXPORT_C CQPoint CQPoint::operator+(QPOINT b) const 
{ 
	return CQPoint(x + b.x, y + b.y); 
}

EXPORT_C CQPoint CQPoint::operator-(QPOINT b) const 
{ 
	return CQPoint(x - b.x, y - b.y); 
}

EXPORT_C CQPoint CQPoint::operator+(QSIZE b) const 
{
	return CQPoint(x + b.cx, y + b.cy);
 }

EXPORT_C CQPoint CQPoint::operator-(QSIZE b) const 
{ 
	return CQPoint(x - b.cx, y - b.cy);
 }

EXPORT_C CQPoint CQPoint::operator-() const 
{ 
	return CQPoint(-x, -y); 
}

